package com.meituan.sdk.model.ddzhkh.clubactivity.clubactivityClubInfoSync;

import com.meituan.sdk.annotations.ApiMeta;
import java.util.List;
import com.google.gson.reflect.TypeToken;
import java.lang.reflect.Type;
import com.meituan.sdk.internal.utils.JsonUtil;
import com.google.gson.annotations.SerializedName;
import javax.validation.constraints.NotNull;
import com.meituan.sdk.MeituanResponse;
import com.meituan.sdk.MeituanRequest;
import javax.validation.constraints.NotEmpty;

/**
* 俱乐部信息同步接口
* This file was automatically generated.
*/
@ApiMeta(
    path = "/ddzhkh/clubactivity/club/info/sync",
    businessId = 59,
    apiVersion = "10003",
    apiName = "clubactivity_club_info_sync",
    needAuth = true
)
public class ClubactivityClubInfoSyncRequest implements MeituanRequest<ClubactivityClubInfoSyncResponse> {
    /**
    * <p data-diff-id="ct-diff-id-6bcd9ce8-1c86-4eea-8fc9-d3297ca295cd">操作类型，1-创建，2-更新</p>
    */
    @NotNull(message = "operation不能为空")
    @SerializedName("operation")
    private Integer operation;
    /**
    * <p data-diff-id="ct-diff-id-ca42f8a9-7130-4461-b72c-5301fbe74e95">俱乐部信息列表</p>
    */
    @NotEmpty(message = "clubs不能为空")
    @SerializedName("clubs")
    private List<ThirdPartySyncClubDTO> clubs;

    public Integer getOperation() {
        return operation;
    }
    public void setOperation(Integer operation) {
        this.operation = operation;
    }
    public List<ThirdPartySyncClubDTO> getClubs() {
        return clubs;
    }
    public void setClubs(List<ThirdPartySyncClubDTO> clubs) {
        this.clubs = clubs;
    }


    @Override
    public MeituanResponse<ClubactivityClubInfoSyncResponse> deserializeResponse(String response) {
        Type type = new TypeToken<MeituanResponse<ClubactivityClubInfoSyncResponse>>(){}.getType();
        return JsonUtil.fromJson(response, type);
    }
    @Override
    public String serializeToJson() {
        return JsonUtil.toJson(this);
    }


    @Override
    public String toString() {
        return "ClubactivityClubInfoSyncRequest{" + "operation=" + operation + "," + "clubs=" + clubs + "}";
    }
}
